@startuml
namespace controller {
    class Scheduler << (S,Aquamarine) >> {
        - task Task
        - properties configuration.SchedulerProperties
        - log *zap.SugaredLogger

        + Run()

    }
    class StatusController << (S,Aquamarine) >> {
        - projects *db.ProjectsRepository
        - k8sClient *k8s.Repository

        - calculateClusterDetails(task *db.Task, pods []v1.Pod, services []v1.Service, pvcs []v1.PersistentVolumeClaim, deployments []v1.Deployment) db.ClusterDetails

        + Name() string
        + Execute(ctx context.Context) error

    }
    interface Task  {
        + Name() string
        + Execute( context.Context) error

    }
    class controllerHandlingResult << (S,Aquamarine) >> {
        - handled bool
        - err error

    }
    class generic << (S,Aquamarine) >> {
        - log *zap.SugaredLogger

        - withChannel(channel <font color=blue>chan</font> db.ProjectResult, block <font color=blue>func</font>(*db.Project) (bool, error)) error
        - handleResult(result db.ProjectResult, block <font color=blue>func</font>(*db.Project) (bool, error), results <font color=blue>chan</font> controllerHandlingResult)

    }
}
"controller.generic" *-- "controller.StatusController"

"controller.Task" <|-- "controller.StatusController"

@enduml
